package com.erlang4j.api.exceptions;

import com.ericsson.otp.erlang.OtpErlangInt;
import com.erlang4j.internal.exceptions.Erlang4jException;
import com.erlang4j.internal.exceptions.Erlang4jExceptionConstants;

/**
 * this wraps the OtpErlangRangeException, turning it into a RunTimeException. It happens when you try to represent an
 * OtpErlangInteger as a java type that isn't big enough
 */
public class Erlang4jOutOfRangeException extends Erlang4jException {

	public Erlang4jOutOfRangeException(OtpErlangInt integer, Class<?> expected) {
		super(Erlang4jExceptionConstants.outOfRangeExceptionKey, integer, expected.getSimpleName());
	}

}
